package com.kstudio.ksnapshot.kimage;

import android.graphics.Bitmap;

public class KImageFileData {

    private static final char separatorChar = System.getProperty("file.separator", "/").charAt(0);;
    private static final String separator = String.valueOf(separatorChar);

    private Bitmap bitmap;
    private String path;

    public KImageFileData(String path) {
        this.path = path;
        this.bitmap = null;
    }

    /* Set function */
    public void setBitmap(Bitmap b) {
        bitmap = b;
    }

    /* get function */
    public Bitmap getBitmap() {
        return bitmap;
    }

    public String getPath() {
        return path;
    }

    public String getName() {
        int separatorIndex = path.lastIndexOf(separator);
        return (separatorIndex < 0) ? path : path.substring(separatorIndex + 1, path.length());
    }
}
